/**
 *  @file bullet.cpp
 *
 *  @date 16-nov-2009
 *  @author Ives van der Flaas
 */

#include "bullet.h"
#include "linearController.h"
#include "circularBoundingBox.h"


namespace si
{

Bullet::Bullet(Vector2 startPos, Direction bulletDir):
	Projectile(10, bulletDir, si::Vector2(0.05,0.1)) // do 10 damage, go down and be 0.05 wide and 0.1 high
{
	const double speed = 3.5;
	const Vector2 speedVec(0.0, (bulletDir == DIR_UP) ? (1.0*speed) : (-1.0*speed));
	fController = std::tr1::shared_ptr<Controller>(
						new LinearController(
								startPos,
								speedVec,
								fVirtualSize));

	fBoundingBox = std::tr1::shared_ptr<BoundingBox>(
						new CircularBoundingBox(startPos-fVirtualSize/2, fVirtualSize.getX()/2));

}


Bullet::~Bullet()
{
	// TODO Auto-generated destructor stub
}

}
